import request from '@/utils/request'

// 发布内容
export const createPublish = (data: {
  content: string
  is_public?: boolean
  image_ids?: number[]
}) => {
  return request({
    url: '/publish/create',
    method: 'POST',
    data
  })
}

// 获取发布内容列表
export const getPublishList = (data?: {
  page?: number
  limit?: number
}) => {
  return request({
    url: '/publish/list',
    method: 'POST',
    data
  })
}

// 根据ID获取发布内容详情
export const getPublishById = (data: { publish_id: number }) => {
  return request({
    url: '/publish/detail',
    method: 'POST',
    data
  })
}

// 删除发布内容
export const deletePublish = (data: { publish_id: number }) => {
  return request({
    url: '/publish/delete',
    method: 'POST',
    data
  })
}


